/*
 * MOV.c
 *
 *  Created on: Jan 17, 2014
 *      Author: Rohit
 *
 *  Description: When a MOV opcode is parsed, a call to this function is made.
 *
 */

//INCLUDES
#include "includes.h"

/*
 * Function: func_MOV
 *
 * Inputs:	 Address_of_source, Address_of_destination
 * Outputs:  Void
 *
 */

void func_MOV(unsigned short address_source, unsigned short address_destination)
{
	unsigned short data_source;

	data_source = read_from_memory(address_source,DATA);

	write_in_memory(address_destination, data_source,DATA);

	update_Z_flag(data_source);
	update_N_flag(MOV,data_source);
	update_V_flag(MOV,0,0,0);
}
